import 'package:furaha_mkopo/net/fm_http_model.dart';

class FMHomeEntity extends FMHttpModel {
  FMHomeGodEntity? god;
  List<String>? announcement;
  int? isReyNotice;
  String? isReyNoticeMsg;
  FMHomeWastedEntity? wasted;
  List<FMHomeBeamedEntity>? beamed;

  FMHomeEntity(
      {this.god,
      this.announcement,
      this.isReyNotice,
      this.isReyNoticeMsg,
      this.wasted,
      this.beamed});

  @override
  FMHomeEntity fromJson(Map<String, dynamic> json) {
    god = FMHomeGodEntity.fromJson(json['god']);
    announcement = List<String>.from(json['announcement']);
    isReyNotice = json['is_rey_notice'];
    isReyNoticeMsg = json['is_rey_notice_msg'];
    wasted = FMHomeWastedEntity.fromJson(json['wasted']);
    if (json['beamed'] != null) {
      beamed = List<FMHomeBeamedEntity>.from(
          json['beamed'].map((e) => FMHomeBeamedEntity.fromJson(e)));
    }
    return this;
  }
}

class FMHomeGodEntity {
  String? wrote;
  String? animation;
  int? creditScore;

  FMHomeGodEntity({this.wrote, this.animation, this.creditScore});

  FMHomeGodEntity.fromJson(Map<String, dynamic> json) {
    wrote = json['wrote'];
    animation = json['animation'];
    creditScore = json['credit_score'];
  }
}

class FMHomeWastedEntity {
  String? soul;
  String? millions;

  FMHomeWastedEntity({this.soul, this.millions});

  FMHomeWastedEntity.fromJson(Map<String, dynamic> json) {
    soul = json['soul'];
    millions = json['millions'];
  }
}

class FMHomeBeamedEntity {
  String? firm;
  List<FMHomeVoiceEntity>? voice;

  FMHomeBeamedEntity({this.firm, this.voice});

  FMHomeBeamedEntity.fromJson(Map<String, dynamic> json) {
    firm = json['firm'];
    if (json['voice'] != null) {
      voice = List<FMHomeVoiceEntity>.from(
          json['voice'].map((e) => FMHomeVoiceEntity.fromJson(e)));
    }
  }
}

class FMHomeVoiceEntity {
  String? bidding;
  String? fired; //图片url
  int? listen; //产品id
  String? soul;
  String? generous; //排序
  String? suddenly;
  dynamic stepped;
  dynamic despair;
  dynamic plunge;
  int? useless; //产品id
  String? attempt; // 产品名称
  String? felt; // 产品logo
  String? passing; // 申请按钮文字
  String? wheel; // 产品额度
  String? requested; // 产品名下面描述文字
  String? doors; // 产品期限
  String? inscription; // 产品期限
  String? palaces; // 产品期限
  String? throne; // 产品期限标题
  String? steps; // 产品利率
  String? rarely; // 产品利率标题
  String? suppliants; // 期限logo
  String? access; // 利率logo
  String? majesty; // 产品描述
  String? kind; // 申请按钮颜色

  FMHomeVoiceEntity({
    this.bidding,
    this.fired,
    this.listen,
    this.soul,
    this.generous,
    this.suddenly,
    this.stepped,
    this.despair,
    this.plunge,
    this.useless,
    this.attempt,
    this.felt,
    this.passing,
    this.wheel,
    this.requested,
    this.doors,
    this.inscription,
    this.palaces,
    this.throne,
    this.steps,
    this.rarely,
    this.suppliants,
    this.access,
    this.majesty,
    this.kind,
  });

  FMHomeVoiceEntity.fromJson(Map<String, dynamic> json) {
    bidding = json['bidding'];
    fired = json['fired'];
    listen = json['listen'];
    soul = json['soul'];
    generous = json['generous'];
    suddenly = json['suddenly'];
    stepped = json['stepped'];
    despair = json['despair'];
    plunge = json['plunge'];
    useless = json['useless'];
    attempt = json['attempt'];
    felt = json['felt'];
    passing = json['passing'];
    wheel = json['wheel'];
    requested = json['requested'];
    doors = json['doors'];
    inscription = json['inscription'];
    palaces = json['palaces'];
    throne = json['throne'];
    steps = json['steps'];
    rarely = json['rarely'];
    suppliants = json['suppliants'];
    access = json['access'];
    majesty = json['majesty'];
    kind = json['kind'];
  }
}
